refactored to avoid conflicts in overlap of objects