Analyze the sentence to determine the main clause and the subordinate

Analyze the sentence to determine the main clause and the subordinate clause. Then choose the function of the subordinate clause.

 

The man who wrote this new and popular book autographed copies of it at the bookstore.

Main clause:

 

Subordinate clause:

 

Subordinate clause functions as a(n):

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount