added function to parse top level expressions