added logging debugs