optimize log model