Calculating a result in the thank you page