added functional test (test file)