added a stack for temporaries, otherwise it became to tedious to keep track which function uses which temporary for later