THANKS!
I was looking for a way to get rid of those switch's. Never occurred to me simply use homd=25*homdcount;
I really appreciate you pointing that out to me.