added scaleInout and fadeOutIn functions