#added c++ comments