cleanup taking screen shot code