robot for shmj writen in javascript