singleton func simplified