retries 3 times to ensure successful transaction