moves custom field detection to own method