In calculations, made step checking more efficient