Added Jochems code + revisited parts