Refactored user functions.