code modified for strategy decision