Refactored with same functionnality