hierarchical model by gate smashers