adapted direcotry tutorial