finished first version of this parser