add a singleton class implementation in singleton.cpp