almost done, bug fixed left