corrected end function ( "}" )