Made calculation work without taking pictures.