working version from presentation