begining setup of core logic splitup.