could the ++tries < 5 move here?