whoops, already had this function