upgrade context using generic