add tests for functions