Continued with example 41. Added bug fix for example 40.