reOrgnize and add Error-Handling