delete unnecessary small codes