this is the worst code I have ever written