list: modify it so it can be used in c++ files