refactor tests a bit