refactor  follow spec