added user events. #DOESNOTCOMPILE problem with stl?
fixed stl bug