typos and removing unnecessary code