modiy logic