reworking contexts and inductive types