Added switch creation from boolean