add depth buffer (also some bug)