Added tests for functions.py