got the database working