add functionality to switch between players upon submitting a successful word