class based singleton decorator