Final version of procedure

...for now