Initialisation, search and looping done