First attempt to solve the section 5.12

first attempt to solve section 5.12 and related problems

First Attempt to implement section 5.12 and related problems