change split method to only apply to output string