optimize by expanding boundIfPossible