wow such spaghetti code