implement future cost estimate in stackdecoder