cleanup code
fix simpler logging