Changed parsing logic