grabs pwd correctly