moved code into functions, added call to products set