refactor tests