making log more flexible