added mutex in events