cleaned up code (moved update paragraphes in a method)