Debugged and functioning