bug free, fix \n and multiple space bug