the right way to get PWD