compeleted 4 chapter (4.2 ring.erl added)