refactor controller sales