added toList function