Implemented some vector functions