cleaing up data handling a bit