leave function added to the project controller