adding hierarchy reading from text file