add logging and another example