use an object for options rather than a simple array. #2