cleaning things up and revising data format