added bounding box caluclation function