Implemented the 2 functions without testing from the 'special vector' example.