moved endingblock