refactor code body