This is the complete operation with commented code