Modify functions to accept vectors
Modify functions to accept vectors