data_builder case statement refactoring