database functions added