almost done

there are some bugs