add missing end keyword
fix indentation