singleton refact