epoch calculation and exception handling for Zipf-fit loop in place