added space check