updated singleton logics. checked impl with specs.