added some logging stuff