add algorithm to seek insertion point based on existing imports