Oh, and maybe:
Code:
switch(homdcount){
  case 1:
   homd=25;
   break;
  case 2:
   homd=50;
   break;
  case 3:
   homd=75;
   break;
  case 4:
   homd=100;
   break;
 }
could be replaced with
Code:
homd=25*homdcount;
assuming various things of course, can homdcount only be 1,2,3 or 4, and if not what if it isn't? Maybe if (homdcount>=1 && homdcount<=4) homd=25*homdcount; would work better.