optimized to session variable