integrate findTopLevelAt for better behaviour