added test and changed product to class