adding additional logic to directory that has been pulled from response builder
refactored response builder to account for directory routes