use new draw and resize events