update reply logic