Now completly finished with exercise 10, added error handling and documentation