starting tests. With that I have found a bug and refactored a lot the code and example