implemented logging deeply