ITAT 2013 article, version 5 (MGSO pseudocode)