replaced retrieving from xmlrpc with retrieving from db