modified using ripple