Changed parse code related to val