Added vector calculation