Why did i even write the code like that?