created proper hierarchy