more refactoring but game works again!