changing methods for logging and for register