Add test for functions