include avg calibiration code