added comments to top and each function header.. i think done but should go over