refactored the saleagent update method