a first version (pass basic tests )