Debug version of code. Saved for future debug