Added code for singleton classes