added error inspection
fixed compiler line
return object in create method