Using custom list in a queue