implemented logging