implementing options and pattern-matched options