Added vectoring code