break down code into some tiers