added single instance functionality