Added switch and modulus

Signed-off-by: Jérôme Coupé <jercoupe@gmail.com>