SW-12 Created chopElements method