implemented helper for vector multiply