Refactoring
Adds periodic observation
Finds U with complexety O(n) instead of O(n^2)
Adds observation
Solved problem 167