refactor tests a little