edited to stick to C++ convention