add custom context type support