more logic for i