implement extract options and test it out
documentation and indentation