DRY by adding template filters for logic