needs better explanation, but this is why this code exists