improve documentation of custom singleton creation through an example