added 'end' to private block