added logging system