@ergest: The main function