product initialized in function, check for negative input