attempted to fix #70 n #45, added a boolean value so that 'messages are only sent once'