applied fantinel's changes to pushd