fixed code to match updated product model