done some modification