updated to generate two schemas