Changes made to the logic