added some vector logic