refactor coding