Bumping this because it needs love. This function is do or die for this game.