updating database functions.