adding in virtual directory support. Still not complete