working on parsing the reference string