parse data to arrays