done some modifications