fixed vec reversal and added test case