add calculateVectors method