reorganized methods

moving the low-level `filter` method to the bottom