Added extra database functions