Creating both functions.