some changes to take screenshot