many changes and debbuging