add home logic