adding screenshot functionality