New version of the code, changed it all