re-order and simplifiy