created test function
fixed oddity