impl square cap
optimizate vector and debuging the round cap