created a smart add_product method