added logging capabilities