implemented functions in mem db, returned results should be handled in messagehandler