added logging,