tests and filtering

This function is way nice now. :+1: