another take
slightly change filtering