moved recipe 6 to 8 and some other refactorings