a little more optimization