Implemented two functions.