added moveToTopInStack