re-arranged the API to simplifiy code using the order_splitting mechanism.