updated so that it will run, sorry for the typos