correctly calling log