adding a function to check if vectors given are of same length