added code to pull directory