add screencapture function