figuring out the pathname