handle various extension patterns