make head filtering lazy, improving performance
cleanup