made code slightly more efficient :smile: