shares detection - improvement