Refactor new functions