debugged, and fixed