added some helper functions for vectors