first version of cairn parser