wrote tests for constructors