changed all functions to accept a vector