added example, better option handling