more abstract list implementation