primary game function
bugfixes...