optimizing log