finish get_channel function