added test for functions