move database stuff to the very bottom