added column generation logic (incomplete)