moved functions from Vector function to Vector's prototype