moved vec param into constructor.