finished debugging process: fully functional