adds more db queries and server functions