split index up, added db connection, added db.sql