more logic changes