Added "toList" function.