updated saveSession to fix some errors and include a test