refactor into a function to add columns