a bit work on gallery, but especially added the criterion list for the database