fixed function-call, added more tests