attempt to optimize speed