tried to get a more modular approach
logger :(