added paint and mouse click events