much better checking of syntax