Implemented valitations and unit tests for the product