added addSpaces method