implemented generator and parser