Made the column count dynamic