Added more functionality on the server side