refacored some tests