convert class to singleton
add example