minor improvements like making variables final