canged some code for screenshots