added functions to split arrays