separated code for first test
minor fixes