Problem solved using self implemented linked list with primitive longs inside