refactor code base to support multiple columns