worked on tournament js