var D bug fix
var D optimization
var functions