added a better description of code, still have to modify and delete some old code