changed vector to data.frame