Removed extra 'end' keyword