database stuff began