added proper validations and tests to orders model