make return value a df with more info and add unit test