Algorithm 27 | Scientific Reports