main class changed to use logger