updated to the new home cmd
optimized and simplified onHealthChange