Add tests and improve extend
Some tests