minor optmizations