a couple minor efficiency improvements