add methods to add and remove messages