Complete both functions