improved automatic blocksize selection