Added ss
Slight changes to logic