modified decide_next