Debugged, now works!