defined and built the db