Implemented split. WARNING: NOT FINALISED