improve instance history endpoint