optimise the log