Spotted error - inserted debugoutputs and todo