adding js rules of play