use error() rather than echo()