refactor operation