Added list functions (from lecture)