fail every 3 tries
some changes to cope with failure
Merge pull request #1 from kalmas/handleFails

Handle fails