Refractored filter method
Duplicate space in mid considered as single space