done some dubugging