cleaned it up and lots of modificatiosn