[MODIFIED] Implemented Singlenton's pattern