add functions to calculate health