changedged 4 to count spaces