partially working version of leaflog