added generic function test