Coninue working on database functions