setting options in the constructor if supplied