improve cpu model resolution code