fix in js
implementing new game; test and some code