implemented join grammar