added encryption & session