properly indent the "end" keywords