incorporate more of the statement handling code