working on split functions for all cases