[#69] refractor generate method