added more code to GameThread.java