moved database operations to webserve