first version of health processing
code cleanup
fixed merge conflict