the search courses code transfer from model to lib