implemented everything, time to debug.