some modification but it don't change the main function