added valid and invalid contexts