added func for parents directory