load function from DB