refactored singleton type test