add missing 'end' keyword