added takeScreenshot