Use vector functions whereever possible.