-code work and refactor