getting parent of spaces