fixed sales agent end point and added tests