almost done

now need to debug and UI