fixed the actions and added the searhc function to the model