start with small a_len instead of large a_len