Fixed shitty code with if-else