fixed error return type