setting p directories