Chin Perera : cracked the algorithm