move ensure into stack