refactored main class to take type logger not directly take display