added ability to initialize with options