refactoring : created method for repeated code;
improvement : adding a thin layer of cache for columns