refactoring of main using the weighted collection
Added support to read cpu temperature