Adding code that handles client side input to server