Updated the procedure with proper comments.