Fixed the running part of the code