debugging almost done