Finally running version of the code