partially removed redundancy from syntax.c