Added tests for functions