Updated due to flaws in code
kmom07