Algorithm 5 | Scientific Reports