almost finished. let the debugging begin.