Working with 3-tier architecture