make a little more efficient and structured