record my algorithm way