working version of tests