made the code cleaner and can now delete sessions