updated 2 cpp files due to version incompatibilities