added code that saves tablename into session