comment out unused variable elementLength