adding normalize function for numeric vectors