Added tests for each function