implement switch/case
update documentation
update tests