Updated Logic