added memory statements to output