set to linked list works for all queries