upgrade to use ast