changed working of sdk to proper singleton usage