add vector handler, slight refactor