replace dplyr
improve performance