added some move decision logic