Applying friction to a movieclip

I have a movieclip that accelerates when the user presses the up key. I want this movieclip to slow down using friction when the user lets go of the up key. The code i have written is this -

var ground:MovieClip = new Ground;
ground.x = 0;
ground.y = 400;
addChild(ground);

var xVel:Number = 0;
const xAcc:Number = -0.25;
const friction:Number = 0.9;

stage.addEventListener(KeyboardEvent.KEY_DOWN, acceleration);
function acceleration(evt:KeyboardEvent):void{
if(evt.keyCode == Keyboard.UP){
ground.x += xVel;
xVel += xAcc;
}
else
{
xVel * friction;
}
}

The accelerate part of the movieclip works fine but when i release the up button the movieclip just stops. Can anyone help?