added rest of (the first version of) the implementation chapter