test with type anotations, and better generic code for the parser so that adding the types will be easier