refactored drawHealthBar()