added getGlobalBounds() function