refactored code + added several tests
bug detected: view doesn't work and don't see where happens insert in global list