move processing-specific code from utils to processing