online playing logic implemented