refactored server routes for del and put