Worked on this a while ago and kept my edited version