added using double linked list instead of rubby arrays for bookkeeping of usage frequency.

fixed autotest