smoothing out, getting data ready for ajax