added screenshoting code