pre-processing client data to add alerts
merge with re-formatted code