trying to add database functions