usable version with layer results and history limits