implement evenly distributing spaces and dealing with lines with only one word
change code according to change api of pad_spaces