added final touches for "showLabels" option