changes to reapply stash
more changes to functionality