It is currently March 29th, 2024, 7:14 am

Need a clue with Scaling/Moving text in relation to Transformation Matrix

Get help with creating, editing & fixing problems with skins
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Need a clue with Scaling/Moving text in relation to Transformation Matrix

Post by jminternelia »

I have managed to scale a doppler radar with Transformation Matrix, but the text doesn't move with it, only scales in size. I'm sure it is super obvious.

Code: Select all

; ____________        .__     /\         ____  __________       .__  
;|_   \_____  \_____  |__| ___)/  ______ \   \/  |_____  \ __ __|__| 
; |   |/  ____/\__  \ |  |/    \ /  ___/  \     / /  ____/|  |  \  | 
; |   /       \ / __ \|  |   |  \\___ \   /     \/       \|  |  /  | 
; |___\_______ (____  /__|___|  /____  > /___/\  \_______ \____/|__| 
;             \/    \/        \/     \/        \_/       \/          

[Metadata]
Author=12a!n

[Rainmeter]
Update=175
SkinWidth=1920
SkinHeight=1080

[Variables]
S=[!UpdateMeasure MeasureScaleIt][!UpdateMeter *][!Redraw]
Scale=1
XPOS=

@IncludeVars=#@#Variables.inc
;closest radar site name, from http://forecast.weather.gov/jetstream/doppler/ridge_download.htm
;Radar range (can be Short or Long)
Range=Short
;product type, from http://forecast.weather.gov/jetstream/doppler/ridge_download.htm
;if using Long range, Type MUST be N0Z
Type=N0R
RSite=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RSite2=http://radar.weather.gov/ridge/Overlays/County/#Range#/#NEXRADid#_County_Short.gif
RSite3=https://radar.weather.gov/ridge/Overlays/Topo/Short/#NEXRADid#_Topo_Short.jpg
U=[!UpdateMeter *][!Redraw]

;=======================================================================

[MeasureScaleIt]
Measure=Plugin
Plugin=ActionTimer
ActionList1=ScaleUp
ScaleUp=[!SetVariable Scale "(Clamp(#Scale#+0.05,0.2,2))"]#S#
ActionList2=ScaleDown
ScaleDown=[!SetVariable Scale "(Clamp(#Scale#-0.05,0.2,2))"]#S#
DynamicVariables=1

[MeasureTopography]
Measure=Webparser
Url=https://radar.weather.gov/ridge/Overlays/Topo/#Range#/#NEXRADid#_Topo_Short.jpg
Download=1
DownloadFile=topo.jpg
UpdateRate=-1
FinishAction=#U#

[MeasureImage]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar0.gif
FinishAction=#U#

[MeasureImage1]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar1.gif
FinishAction=#U#

[MeasureImage2]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar2.gif
FinishAction=#U#

[MeasureImage3]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar3.gif
FinishAction=#U#

[MeasureImage4]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar4.gif
FinishAction=#U#

[MeasureImage5]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar5.gif
FinishAction=#U#

[MeasureImage6]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar6.gif
FinishAction=#U#

[MeasureImage7]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar7.gif
FinishAction=#U#

[MeasureImage8]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href=".*".*"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar8.gif
FinishAction=#U#

[MeasureImage9]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar9.gif
FinishAction=#U#

[MeasureImage10]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar10.gif
FinishAction=#U#

[MeasureImage11]
Measure=Webparser
UpdateRate=1764
Url=http://radar.weather.gov/ridge/RadarImg/#type#/#NEXRADid#/?C=M;O=D
RegExp=(?siU)"/icons/image2.gif" alt="\[IMG]"></td><td><a href="(.*)"
StringIndex=1
Download=1
DownloadFile=radar11.gif
FinishAction=#U#

[MeasureCounties]
Measure=Webparser
Url=http://radar.weather.gov/ridge/Overlays/County/#Range#/#NEXRADid#_County_Short.gif
Download=1
DownloadFile=counties.gif
UpdateRate=-1
FinishAction=#U#

;=======================================================================

[DisplayTopography]
Meter=Image
ImageName=#CURRENTPATH#DownloadFile\topo.jpg
MaskImagePath=#@#Images\map\
MaskImageName=Mask.png
AntiAlias=1
W=1312
X=0
y=0
ColorMatrix1=0;0;0;0;0
ColorMatrix2=0;0.12;0;0;0
ColorMatrix3=0;0.33;1.04;0;0
ColorMatrix4=0.1;0;-0.3;0.8;0.2
ColorMatrix5=0;0;0;0;1
LeftMouseUpAction=https://radar.weather.gov/ridge/radar.php?rid=#NEXRADid#&product=#Type#&overlay=11101111&loop=yes
DynamicVariables=1
MouseScrollUpAction=[!CommandMeasure MeasureScaleIt "Execute 1"]
MouseScrollDownAction=[!CommandMeasure MeasureScaleIt "Execute 2"]
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])

[RadarAnimation]
Measure=Calc
Formula=Counter % 12

[DisplayRadar]
Meter=Image
ImageName=#CURRENTPATH#DownloadFile\radar[RadarAnimation].gif
MaskImagePath=#@#Images\map\
MaskImageName=Mask.png
AntiAlias=1
DynamicVariables=1
W=1312
X=0
Y=0
ImageAlpha=80
;ColorNegative
;ColorMatrix1=-0.3;-0.3;-0.3;0.0;0.0
;ColorMatrix2=-0.6;-0.6;-0.6;0.0;0.0
;ColorMatrix3=-0.1;-0.1;-0.1;0.0;0.0
;ColorMatrix4=0.0;0.0;0.0;1.0;0.0
;ColorMatrix5=1.0;1.0;1.0;0.0;1.0
;ColorMapMatch
ColorMatrix1=0.0333333;-0.0666667;-0.0666667;0.0000000;0.0000000
ColorMatrix2=0.1666667;-0.3333333;-0.3333333;0.0000000;0.0000000
ColorMatrix3=0.0666667;-0.1333333;-0.1333333;0.0000000;0.0000000
ColorMatrix4=0.1000000;-0.2000000;-0.2000000;1.0000000;0.0000000
ColorMatrix5=-0.3333333;0.6666667;0.6666667;0.0000000;1.0000000
MouseScrollUpAction=[!CommandMeasure MeasureScaleIt "Execute 1"]
MouseScrollDownAction=[!CommandMeasure MeasureScaleIt "Execute 2"]
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])
LeftMouseUpAction=https://radar.weather.gov/ridge/radar.php?rid=#NEXRADid#&product=#Type#&overlay=11101111&loop=yes

[DisplayCounties]
Meter=Image
ImageName="#CURRENTPATH#DownloadFile\counties.gif"
MaskImagePath=#@#Images\map\
MaskImageName=Mask.png
AntiAlias=1
W=1310
X=0
Y=0
ColorMatrix1=-0.5;1.7;0;0;0
ColorMatrix2=-2;0.5;0.5;0;0
ColorMatrix3=-0.5;1.2;0.1;0;0
ColorMatrix4=-0.9;0;0.9;0.5;0
ColorMatrix5=1;0;0;0;1
ColorMatrix6=1.089508;-0.9326327;-0.932633;0;0
ColorMatrix7=-1.817718;0.1683074;-1.841692;0;0
ColorMatrix8=-0.2445895;-0.2478156;1.762185;0;0
ColorMatrix9=0;0;0;0.3;0
ColorMatrix10=1;1;1;0;1
LeftMouseUpAction=https://radar.weather.gov/ridge/radar.php?rid=#NEXRADid#&product=#Type#&overlay=11101111&loop=yes
DynamicVariables=1
MouseScrollUpAction=[!CommandMeasure MeasureScaleIt "Execute 1"]
MouseScrollDownAction=[!CommandMeasure MeasureScaleIt "Execute 2"]
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])

[MeterOverlayMask]
Meter=Image
ImageName=#@#Images\map\MapMask.png
X=0
Y=0
w=1310
ImageAlpha=175
LeftMouseUpAction=https://radar.weather.gov/ridge/radar.php?rid=#NEXRADid#&product=#Type#&overlay=11101111&loop=yes
DynamicVariables=1
MouseScrollUpAction=[!CommandMeasure MeasureScaleIt "Execute 1"]
MouseScrollDownAction=[!CommandMeasure MeasureScaleIt "Execute 2"]
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])

[MeterOverlayGrid]
Meter=Image
ImageName=#@#Images\map\MapGrid.png
X=0
Y=0
w=1310
LeftMouseUpAction=https://radar.weather.gov/ridge/radar.php?rid=#NEXRADid#&product=#Type#&overlay=11101111&loop=yes
DynamicVariables=1
MouseScrollUpAction=[!CommandMeasure MeasureScaleIt "Execute 1"]
MouseScrollDownAction=[!CommandMeasure MeasureScaleIt "Execute 2"]
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])

;=======================================================================

[MeasureConditions]
Measure=WebParser
URL=#WebSite2#
RegExp=(?siU).*<city id=".*".*name=".*".*<sun rise=".*".*set=".*".*<temperature value=".*".* min=".*".*max=".*".*unit=".*".*<humidity value="(.*)".*<pressure value="(.*)".*unit="(.*)".*<speed value=".*".*name=".*".*<direction value=".*".*code=".*".*<clouds value="(.*)"
UpdateRate=1764

[MeasureHumidity]
Measure=WebParser
URL=[MeasureConditions]
StringIndex=1
UpdateRate=1764

[MeasurePressure]
Measure=WebParser
URL=[MeasureConditions]
StringIndex=2
UpdateRate=1764

[MeasurePressureUnit]
Measure=WebParser
URL=[MeasureConditions]
StringIndex=3
UpdateRate=1764

[MeasureCloudCover]
Measure=WebParser
URL=[MeasureConditions]
StringIndex=4
UpdateRate=1764

[MeterhPa]
Meter=String
MeasureName=MeasurePressure
MeasureName2=MeasurePressureUnit
FontColor=130,209,222
FontFace=Denton
FontSize=7
AntiAlias=1
StringAlign=Left
Text=AIR PRESSURE: %1 %2
InlinePattern=E:(.*)
InlineSetting=Color | 251,134,80
X=310r
Y=-72R
DynamicVariables=1
MouseScrollUpAction=[!CommandMeasure MeasureScaleIt "Execute 1"]
MouseScrollDownAction=[!CommandMeasure MeasureScaleIt "Execute 2"]
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])

[MeterHumidity]
Meter=String
MeasureName=MeasureHumidity
FontColor=130,209,222
FontFace=Denton
FontSize=7
AntiAlias=1
StringAlign=Left
Text=HUMIDITY: %1%
InlinePattern=Y:(.*)
InlineSetting=Color | 251,134,80
X=r
Y=5R
DynamicVariables=1
MouseScrollUpAction=[!CommandMeasure MeasureScaleIt "Execute 1"]
MouseScrollDownAction=[!CommandMeasure MeasureScaleIt "Execute 2"]
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])

[MeterCloudCover]
Meter=String
MeasureName=MeasureCloudCover
FontColor=130,209,222
FontFace=Denton
FontSize=7
AntiAlias=1
StringAlign=Left
Text=CLOUD COVER: %1%
InlinePattern=R:(.*)
InlineSetting=Color | 251,134,80
X=r
Y=5R
DynamicVariables=1
MouseScrollUpAction=[!CommandMeasure MeasureScaleIt "Execute 1"]
MouseScrollDownAction=[!CommandMeasure MeasureScaleIt "Execute 2"]
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])[attachment=0]X2UiRadLocTMScaleTest_2.3b.rmskin[/attachment]
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need a clue with Scaling/Moving text in relation to Transformation Matrix

Post by balala »

jminternelia wrote: April 16th, 2019, 2:13 am I have managed to scale a doppler radar with Transformation Matrix, but the text doesn't move with it, only scales in size. I'm sure it is super obvious.
I'm sorry but there are two skin files (Local Doppler Radar.ini and Local Doppler Radar Scalable.ini), but none is working properly, because:
  • The Local Doppler Radar.ini doesn1t have a TransformationMatrix option at all (so we have nothing to talk about in this case).
  • The Local Doppler Radar Scalable.ini skin doesn't work, because you forgot to pack the @Resources folder as well, but this would be needed, containing included files (like images or the Variables.inc file).
Please pack once again the whole config you have so far and upload it again.
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Re: Need a clue with Scaling/Moving text in relation to Transformation Matrix

Post by jminternelia »

https://drive.google.com/open?id=16fVCK7RQJAcZ6aIrHS970Bn7CJDNGY4m

Apologies. Lack of sleep. File is too large to host here, so had to upload to Google Drive.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need a clue with Scaling/Moving text in relation to Transformation Matrix

Post by balala »

jminternelia wrote: April 16th, 2019, 2:13 am the text doesn't move with it, only scales in size.
And how would you like to move it? It should have to be kept in the same position on the image when scaling?
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Re: Need a clue with Scaling/Moving text in relation to Transformation Matrix

Post by jminternelia »

Yes. It scales in size, but I want it to have the same X/Y pos relative to the radar itself.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need a clue with Scaling/Moving text in relation to Transformation Matrix

Post by balala »

jminternelia wrote: April 16th, 2019, 10:20 pm Yes. It scales in size, but I want it to have the same X/Y pos relative to the radar itself.
There is only one thing you have to do. The last two parameters of a TransformationMatrix option are used to move the "transformed" meter. They are needed because an applied TransformationMatrix makes the transformation (whatever that transformation is, a scaling a skewing, a rotation or anything else) related to the top left corner of the skin. So, you have to move the meter to get it in the same position as wihout the TransformationMatrix.
But in your case the idea is exactly to get the meters unmoved. You have to replace the last two parameters of all ((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])) with 0;0. So, replace the existing TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y]) options with TransformationMatrix=#Scale#;0;0;#Scale#;0;0.
Does it work well now?
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Re: Need a clue with Scaling/Moving text in relation to Transformation Matrix

Post by jminternelia »

balala wrote: April 17th, 2019, 3:03 pm There is only one thing you have to do. The last two parameters of a TransformationMatrix option are used to move the "transformed" meter. They are needed because an applied TransformationMatrix makes the transformation (whatever that transformation is, a scaling a skewing, a rotation or anything else) related to the top left corner of the skin. So, you have to move the meter to get it in the same position as wihout the TransformationMatrix.
But in your case the idea is exactly to get the meters unmoved. You have to replace the last two parameters of all ((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y])) with 0;0. So, replace the existing TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*[#CURRENTSECTION#:X]);((1-#Scale#)*[#CURRENTSECTION#:Y]) options with TransformationMatrix=#Scale#;0;0;#Scale#;0;0.
Does it work well now?
That is fantastic. Thank you.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need a clue with Scaling/Moving text in relation to Transformation Matrix

Post by balala »

I'm glad if you got it working as wanted.