change class to singleton