Incorrect logic for parentab