made int x and int y static. weird things are happening.