handle history messages