real basic working version, going to scrap this and build it on top of a rails project