There are some changes i have done in the patch