refactor last test