adjusted to c++ standards on declaring const