added logging statements