rename chan to channel