Added some backup func

- made the code easier to read