add some database functions, probably works
add some database functions, probably works