server code now selects what operation to use based on 'op' parameter