scoping added
xml parsing improved
cost model added