seperate the function into minig and fbGrepper