Simplefied SoulsandRims
Replaced two for loops with a single if