to add capture for setcapture and releasecapture function