added flag to check for current execution status