gm functional, added test generation