commented code and created check ripple id function