completed more than half of the database methods, rearrange how module connects to DB