Trying to fix vectorization first of all