adding singleton method

tests included.