implemented Average health plot