added comments for getInstance and setInstance methods