almost done. finding bug