added code to parse out solution