added screenshot taking functionality