trying to get vectorization to work