modified ListGen and Parser