refactored add column functions, tests passing