Adding for-each loop to removePen method