removed unused error var