working code, for presentaiton