Storing ouput in session variable isntead of flash