Corrected way of using vectors