changed default parameter to remove spaces
refactoring + bugfix error handling on create