renamed normalizeSpace to normalizeArray and put into help functions block