optimize lots of methods on ArrayList