fix extra space
clean-up code