almost done, some minor mistake has been done by me, I guess