added space filtering