Added a method for checking whether there was enough data to perform a calculation