switched to logging