RPS done in JS