logging and simplification