added new getBounds function