fix bugs and add reply functionality in message