rough, dirty not styled or optimized code implementing filtering by tags