complete singleton pattern and test