Working version, before changing tasks execution flow