PA log
code tidy