Adding switch implementation.