Modified fromSession logic