some changes related to pointer arithmatic