cleared up some code