add logic for screenshot