connection between filter, database and gallery, buggy