Different ways of stopping calculation