or you can just return directly the error value and not use an auxliary variable...