bug fixed
almost done