Create scaleVector function