functions to supplement dplyr