trying to optimize repeat vector a bit