How to stop teachers leaving the profession