Once #675 #676 completed, let's review the source code of them find a common pattern and refactor to follow DRY principle.