Adding a timer to refresh the messages