fixing up the database. making the selvets simplified