Refactor to use same routine