reorganized code a bit, used BitmapAnimation instead of Sprite (deprecated?)