moved to screenshot function