Implement functions.