adding some comments and checking if target player is online before sending a message