Implement the functions.