Add better error handling; start computing percentages