write operation replaced with writeAndFlush