improve code
refactor code