optimized split command, with native JS