cleared up the code