added logging statements back in