almost finish list function