to serve the confidential nature of his duties , he was accorded the rank of lieutenant in the special branch of the rnvr , and it is a measure of the satisfaction his services gave to his superiors that he ended the war with the rank of commander .