Implemented a way to determine if the computation is complete.