made code slightly more efficient :smile:
Merge pull request #1 from Chachi-inactive/master

made code slightly more efficient :smile: