adding tests, function test is broken