explicit casts for pointer arithmetic