Exercise 2.57 - my answer, tested. the results aren't that great, but it meets all the customer specifications, so...
added comment