hacked this together from the asteroids gl example