refactor without clean and quick return pointer implement for integer