working on avg_od, bug with zbuffer