Added slight changes to the logic based on TA feedback