update teh apigen