add basic store pruning/terminate condition