update ball logic