minor changes in cases for parseVal