added tests for functions.cs