refactor, add timestamp, lvl parameter