added the check to see if there's 3 attempts to relay