Changing method to end