add parser and move partly to groovy