helper functions added on the server side of the code