put logic in server code