Uncommented the new method and the if statements