wrote more tests for functions