Added ability to change number of columns