modified log method