testing debug statement and addeed some stwitches, shorthend some if's and defined some ints