split input into individual arrays