implemented nice pagging of the messages