simplify a common task by keeping more pointers