refactor: use pointer type