added do block, corrected indentation