refactored some methods and added lots of documentation to the backup method