#175 add maxAttempts parameter
#175 add additional test