switch case i stedet for arrays

code cleanup