added chan merge function
added chan split function