add singleton and autolock