changed space string function so it matches the representation