Refactor
Add test