track topmost elements, a bit slower though more stable