minor refactoring in BitmapData