fixed test-function.. and stuff