add variable connections to all query functions
adjust core to db connection
add connection to schema initialization