added no-legend option