using vectors instead of lists