fixed error return type, updated docblock