reduceVector function

Remove zeros and repeated values