pointer semantics work