refactor

refactor code