upgrade parse algorithm with split