changed the grammar to avoid unnecessary StringTokenizer use.