lastModifiedSessions added, rewrite method improved