Changed part of the code