make sure context extends from passed in context