lib: add singleton method