Added list printing functionality