more efficient and more correct