avoid generating bigger state than necessary