updated to answer question. using dplyr!