Reduce the complexity of process_it()