optimize to using fewer code!