+documentation, changed exception handling