add constructor to take logger instance