Generate scheme