enhanced version, length, attempts added