this can be programmed much nicer than these large if's and so many if's with almost the same code...