implemented handle_piece_msg()