more work on finite horizon planning