made more flexible, able to deal with un-initialized columns