improvements and documentation of options

returns output rather than print output, options defined