Created both functions