add changes to build ast rightly