update scala/bash
revisited josephus permutation